package com.etc.test2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Date;

/**
 * @author MaZheng
 * @since 2020/12/23 - 13:02
 */
public class TestMain4 {
    public static void main(String[] args) {

        ApplicationContext context = new ClassPathXmlApplicationContext("springContext.xml");

        Emp emp = context.getBean(Emp.class);
        System.out.println(emp);
        Date d = context.getBean(Date.class);
        System.out.println(d);

        System.out.println(emp.getDept());
    }
}
